package com.umeng.kaoti2.presenter;

import com.example.mvplibrary.mvplibrary.callback.BaseModelCallback;
import com.example.mvplibrary.mvplibrary.model.BaseModel;
import com.example.mvplibrary.mvplibrary.presenter.BasePresenter;
import com.umeng.kaoti2.data.HighOpinionBean;
import com.umeng.kaoti2.model.MainModel;
import com.umeng.kaoti2.view.MainView;

import java.util.List;

public class MainPresenter extends BasePresenter<MainView, MainModel> implements BaseModelCallback<List<HighOpinionBean.ListBean>> {
    @Override
    public void OnError(String error, int code) {
        getmView().onFailed(error);
    }

    @Override
    public void OnSuccess(List<HighOpinionBean.ListBean> listBeans) {
        getmView().onSuccess(listBeans);
    }

    public void getData(){
        getModel().getData(this,getLifecycleProvider());
    }

}
